package cn.stylefeng.guns.modular.commodity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author allen
 * @date 2021/4/11 17:59
 * @version 1.0
 */

/**
 * 商品中心的类目表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "commodity_category")
public class CommodityCategoryEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类目名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 类目描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 父类目的主键
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 是否为叶子类目，1：是，0：否
     */
    @TableField(value = "is_leaf")
    private Integer isLeaf;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_NAME = "name";

    public static final String COL_DESCRIPTION = "description";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_IS_LEAF = "is_leaf";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}